﻿
@{
    ViewData["Title"] = "未授权访问";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<div class="row justify-content-center" id="app" v-clock>
    <div class="col-md-12 text-center">
        <span class="display-1 d-block">401</span>
    </div>
    <div class="row col-md-6">
        <div class="col-md-12 text-center">
            <div class="card">
                <div class="card-body">
                    <div class="alert alert-warning">无权限访问</div>
                </div>
            </div>
            <div class="card">
                <div class="card-body">
                    <button type="submit" class="btn btn-primary px-5" @@click="funBack">【{{lastSecounds}}秒后自动】返回上一页</button>
                </div>
            </div>
        </div>
    </div>

</div>
@section Scripts
{
    <script>
        new Vue({
            el: "#app",
            data: function () {
                return {
                    lastSecounds: 5,
                }
            },
            created: function () {

            },
            mounted: function () {
                this.funSetTime();
            },
            update: function () {

            },
            watch: {

            },
            methods: {
                funSetTime: function () {
                    var that = this;
                    setInterval(function () {
                        that.lastSecounds = that.lastSecounds - 1;
                        if (that.lastSecounds < 1) {
                            window.history.go(-1);
                        }
                    },
                        1000);
                }, funBack: function () {
                    window.history.go(-1);
                }
            }
        })
    </script>
}
